package cn.edu.pku.ss.situationperceiver;

import org.alljoyn.bus.BusException;
import org.alljoyn.bus.annotation.BusInterface;
import org.alljoyn.bus.annotation.BusMethod;
import org.alljoyn.bus.annotation.BusSignal;

/*
 * This is a AllJoyn interface for remote method call and signal.
 * Functionalities of the Bus Object:	(updated May 23, 2013) 
 * 1) Express interest(deprecated) -> by sending a ContextSharingRequest to all the peers on the session.
 * 2) Receive interest -> receive a ContextSharingRequest and transfer the request to ContextSharingService. (ignore when senderid==itself)
 * 3) Receive a context message -> receive the Shared Context Message, check the recipient and transfer it to Interpreter.
 * 
 * */

@BusInterface (name = "cn.edu.pku.ss.situationperceiver.ContextShareInterface")
public interface ContextShareInterface {
//	@BusMethod
//	public void expressInterest(String interestMsg) throws BusException;
	
//	@BusMethod
//	public String shareContext(String arg1, String arg2) throws BusException;
	
//	 @BusSignal
//	 public void SendContextSharingRequest(ContextSharingRequest mContextSharingRequest) throws BusException;
	 
	 @BusSignal
	 public void ReceiveContextSharingRequest(ContextSharingRequest mContextSharingRequest) throws BusException;
	 
	 @BusSignal
	 public void ReceiveContextMessage(ContextMessage mContextMessage) throws BusException;
	 
	 @BusSignal
	 public void test(Test t) throws BusException;
}
